<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('渠道推广资源重复率统计列表')"/>
    <!--<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>-->


    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet"  href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.10.0/css/bootstrap-select.min.css">

</head>
<style>
    body {
        padding: 0;
        margin: 0;
        border-radius: 0;
    }

    .watermark-wrapper {
    }

    .header {
        height: 45px;
        line-height: 45px;
        padding-left: 20px;
        color: #fff;
        background-color: rgb(67, 142, 185);
        display: flex;
        justify-content: space-between;
    }


    .header_right {
        display: flex;

    }

    .username {
        padding: 0 5px;
        background-color: rgb(46, 101, 137);
    }

    .line {
        width: 2px;
        background-color: #fff;
    }

    .layui-nav {
        height: 40px;
        background-color: rgb(46, 101, 137);
        text-align: center;
        line-height: 40px;
    }

    .content {
        min-height: calc(100vh - 150px);
        display: flex;
        background-color: #fff;
    }

    .slider {
        padding-left: 20px;
        width: 10vw;
        position: relative;

    }

    .slider_title {
        font-size: 16px;
        font-weight: bold;
        color: rgb(38, 121, 181);
        line-height: 50px;
        display: flex;
        align-items: center;
        padding-right: 10px;
        border-right: #0E749C 2px solid;
    }

    .second-title {
        position: relative;
        font-size: 12px;
        font-weight: bold;
        padding: 0 15px;
        color: rgb(38, 121, 181);
        border-right: #0E749C 2px solid;
    }

    .slider-line {
        width: 80%;
        height: 1px;
        background-color: #f0f0f0;
        margin: 30px auto 20px auto;
    }

    .slider-line2 {
        width: 95%;
        height: 1px;
        background-color: #f0f0f0;
        margin: 0 auto;
    }

    .center {
        width: 85vw;
        min-height: calc(100vh - 150px);
        padding: 20px;
        border-left: 2px solid #f0f0f0;

    }

    .nav {
        display: flex;
        align-items: center;
        margin: 30px 0;
    }

    .fixed-table-toolbar {
        display: none;
    }

    .pagination-info {
        display: none;
    }

    .table-row-color-1 {
        background-color: #E0E0E0;
    }

    .layui-nav {
        height: 45px;
    }

    .th-inner {
        color: slategrey;
    }
    .layui-table-cell {
        background-color: #fff;
        z-index: 2100;
    }
    #bootstrap-table thead{
        z-index: 2300;
        position: relative;
    }
</style>
<body class="gray-bg">

<div class="watermark-wrapper" id="watermark-wrapper">
    <div class="header" style="z-index: 9999;position:relative;">
        <div class="header_left">
            <span style="font-size: 17px;">海能网销系统</span>
            （<span style="font-size: 17px;">坐席号0;</span>
            <span style="font-size: 17px;">电话:;</span>
            <span style="font-size: 17px;">用户id:19008750</span>）
        </div>
        <div class="header_right">
            <div class="username">
                米哈1003
            </div>
            <div class="line"></div>
            <ul class="layui-nav" style="padding: 0;">
                <li class="layui-nav-item">
                    <a href="javascript:;" style="line-height: 45px;background-color: rgb(46, 101, 137);color:#fff">欢迎，米哈1003</a>
                    <!--  <dl class="layui-nav-child">
                          <dd><a href="">菜单1</a></dd>
                          <dd><a href="">菜单2</a></dd>
                          <dd><a href="">菜单3</a></dd>
                      </dl>-->
                </li>
            </ul>
        </div>
    </div>
    <div class="content">
        <div class="slider">
            <div class="slider_title">
                <svg t="1730171921259" style="width: 20px;height: 20px;margin-right: 10px;" class="icon"
                     viewBox="0 0 1346 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1878" width="200"
                     height="200">
                    <path d="M0 0h76.560748v1024H0z" p-id="1879" fill="#2679B5"></path>
                    <path d="M1.595016 947.439252h1344.59813v76.560748H1.595016zM153.5681 745.398629l396.999377-396.999377 122.92785 122.927851-396.999377 396.999377zM589.150903 631.067913l439.857446-439.857446 122.92785 122.927851-439.841495 439.857445z"
                          p-id="1880" fill="#2679B5"></path>
                    <path d="M426.794268 471.0081l122.92785-122.943801 281.950904 281.950903-122.927851 122.943801zM1253.682243 387.588785V105.271028c0-7.975078-6.380062-12.760125-12.760125-12.760125H958.604361c-11.165109 0-17.545171 14.35514-9.570093 22.330218l282.317757 282.317758c7.975078 7.975078 22.330218 3.190031 22.330218-9.570094z"
                          p-id="1881" fill="#2679B5"></path>
                </svg>
                渠道推广统计
                <i class="layui-icon layui-icon-down" style="margin-left: auto;"></i>

            </div>
            <div class="second-title">渠道推广资源重复率V2
                <svg t="1730173942912" class="icon" style="position:absolute;top:-5px;right:-8px;"
                     viewBox="0 0 1024 1024" version="1.1"
                     xmlns="http://www.w3.org/2000/svg" p-id="13244"
                     data-spm-anchor-id="a313x.search_index.0.i18.3f773a812cqKm0"
                     width="20" height="50">
                    <path d="M702 896L322 512.7 702 128v768z" fill="#2679B5" p-id="13245"
                          data-spm-anchor-id="a313x.search_index.0.i19.3f773a812cqKm0" class="selected"></path>
                </svg>
            </div>
            <div class="slider-line"></div>
            <div class="slider-line2"></div>
            <svg t="1730173123954" class="icon" style="width: 25px;height:25px;position:absolute;top:85px;left:90px;"
                 viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9489"
                 data-spm-anchor-id="a313x.search_index.0.i12.3f773a812cqKm0" width="200" height="200">
                <path
                        d="M512 969.6C259.2 969.6 54.4 764.8 54.4 512S259.2 54.4 512 54.4 969.6 259.2 969.6 512 764.8 969.6 512 969.6z m0-851.2C294.4 118.4 118.4 294.4 118.4 512S294.4 905.6 512 905.6 905.6 729.6 905.6 512 729.6 118.4 512 118.4z"
                        fill="#f0f0f0" p-id="9490"></path>
                <path
                        d="M470.4 694.4c-9.6 0-16-3.2-22.4-9.6l-150.4-150.4c-12.8-12.8-12.8-32 0-44.8l150.4-150.4c12.8-12.8 32-12.8 44.8 0s12.8 32 0 44.8l-128 128 128 128c12.8 12.8 12.8 32 0 44.8-6.4 6.4-16 9.6-22.4 9.6z"
                        fill="#f0f0f0" p-id="9491"></path>
                <path
                        d="M662.4 694.4c-9.6 0-16-3.2-22.4-9.6l-150.4-150.4c-6.4-6.4-9.6-12.8-9.6-22.4s3.2-16 9.6-22.4l150.4-150.4c12.8-12.8 32-12.8 44.8 0s12.8 32 0 44.8l-128 128 128 128c12.8 12.8 12.8 32 0 44.8-6.4 6.4-16 9.6-22.4 9.6z"
                        fill="#f0f0f0" p-id="9492"></path>
            </svg>
        </div>
        <div class="center">
            <h2 style=" color: #0E749C;font-weight: 100;">渠道推广资源重复率统计</h2>
            <hr>
            <div class="container-div">
                <div class="row">
                    <div class="col-sm-12 search-collapse" style="box-shadow: none;">
                        <form id="formId">
                            <div class="select-list">
                                <ul>
                                    <li>
                                        <label style="width: 100px;">渠道页面标识：</label>
                                        <select name="channelName" style="height:30px;width:150px;"
                                                id="example-getting-started" class="form-control" multiple="multiple"
                                                data-live-search="true"
                                                title="请选择推广渠道标识">
                                            <option th:each="channel : ${channelList}" th:text="'米哈-' +${channel}"
                                                    th:value="${channel}"></option>
                                        </select>
                                    </li>
                                    <li>
                                        <label style="width: 100px;">加微时间：</label>
                                        <input type="text" class="time-input" id="addStartTime" placeholder="开始时间"
                                               name="addStartTime" style="height: 30px;"/>
                                        <input type="text" class="time-input" id="addEndTime" placeholder="结束时间"
                                               name="addEndTime" style="height: 30px;"/>
                                    </li>
                                    <li>
                                        <button type="button" class="layui-btn layui-btn-normal"
                                                style="background-color: #428BD5;height: 32px;width: 61px;border: black;color:aliceblue;"
                                                onclick="$.table.search()">查&nbsp;&nbsp;询
                                        </button>
                                    </li>
                                </ul>
                            </div>
                        </form>
                    </div>

                    <div class="col-sm-12 select-table" style="box-shadow: none;">
                        <table id="bootstrap-table"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<th:block th:include="include :: footer"/>

<!--<script th:src="@{/ruoyi/js/jquery.min.js}"></script>-->
<script th:src="@{/ruoyi/js/bootstrap.min.js}"></script>
<!--<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>-->
<!--<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />-->
<!--<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>-->
<script th:src="@{/ruoyi/3.3.7/bootstrap.min.js}"></script>


<!-- Latest compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.10.0/js/bootstrap-select.min.js"></script>

<!-- (Optional) Latest compiled and minified JavaScript translation files -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.10.0/js/i18n/defaults-zh_CN.min.js"></script>

<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('system:tatic:edit')}]];
    var removeFlag = [[${@permission.hasPermi('system:tatic:remove')}]];
    var prefix = ctx + "system/tatic";

    $(function () {
        var options = {
            url: prefix + "/findChannelPromotionRepeatTatic",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "渠道推广资源重复率统计",
            rowStyle: function (row, index) {    // 动态修改行的颜色
                // 判断是否为最后一行
                if (row.channelName === '合计') {
                    return {css: {"font-size": "15px","font-weight": "bold"}};
                }
                if (index % 2 === 0) {    // 如果证件状态值为2设置本行字体颜色为红色
                    return {css: {"background-color ": '#f9f9f9', "z-index": "2000","position": "relative","font-family":"system-ui"}};
                }else{
                    return {css: {"font-family":"system-ui"}};
                }

                return '';
            },
            columns: [
                {
                    field: 'channelName',
                    title: '渠道标识'

                },
                {
                    field: 'intervalAddResourceCount',
                    title: '区间段新增资源数(未去重)'
                },
                {
                    field: 'intervalActualAddResourceCount',
                    title: '渠道实际新增资源数(去重)'
                },
                {
                    field: 'intervalAllAddResourceCount',
                    title: '全库实际新增资源数(去重)'
                }]
        };
        $.table.init(options);

    });


</script>


<script>
    layui.use('laydate', function () {
        var laydate = layui.laydate;
        laydate.render({
            elem: '#addStartTime' //指定元素
            , type: 'datetime' //设置类型
        });
        laydate.render({
            elem: '#addEndTime' //指定元素
            ,type: 'datetime' //设置类型
            ,
            done:function(value,date,endDate)
            {
                if(value)
                {
                    var split = value.split(" ");
                    if(split[1] == "00:00:00")
                    {
                        this.dateTime.hours = 23;
                        this.dateTime.minutes = 59;
                        this.dateTime.seconds = 59;
                    }
                }
            }
        });
    });
</script>

<!-- 以下均是加水印代码 -->
<script>
    $(document).ready(function () {
        var watermark_txt = "19008750&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>" + getDate();
        //var watermark_txt = getDate()+"             <br>" + getDate();

        //watermark({ "watermarl_element": "watermark-wrapper", "watermark_txt": "米哈1111" });
        watermark({"watermarl_element": "watermark-wrapper", "watermark_txt": watermark_txt});
    });

    function watermark(settings) {
        //默认设置
        var defaultSettings = {
            watermarl_element: "body",
            watermark_txt: "",
            watermark_x: 10,//水印起始位置x轴坐标
            watermark_y: 10,//水印起始位置Y轴坐标
            watermark_rows: 2000,//水印行数
            watermark_cols: 2000,//水印列数
            watermark_x_space: 20,//水印x轴间隔
            watermark_y_space: 20,//水印y轴间隔
            watermark_color: '#d7d7d7',//水印字体颜色
            watermark_alpha: 0.5,//水印透明度
            watermark_fontsize: '13px',//水印字体大小
            watermark_font: '微软雅黑',//水印字体
            watermark_width: 500,//水印宽度
            watermark_height: 50,//水印长度
            watermark_angle: 30//水印倾斜度数
        };
        //采用配置项替换默认值，作用类似jquery.extend
        if (arguments.length === 1 && typeof arguments[0] === "object") {
            var src = arguments[0] || {};
            for (key in src) {
                if (src[key] && defaultSettings[key] && src[key] === defaultSettings[key]) {
                    continue;
                } else if (src[key]) {
                    defaultSettings[key] = src[key];
                }
            }
        }

        var oTemp = document.createDocumentFragment();

        var maskElement = document.getElementById(defaultSettings.watermarl_element) || document.body;
        //获取页面最大宽度
        var page_width = Math.max(maskElement.scrollWidth, maskElement.clientWidth);
        //获取页面最大高度
        var page_height = Math.max(maskElement.scrollHeight, maskElement.clientHeight, maskElement.scrollTop);
        //水印数量自适应元素区域尺寸
        defaultSettings.watermark_cols = Math.ceil(page_width / (defaultSettings.watermark_x_space + defaultSettings.watermark_width));
        defaultSettings.watermark_rows = Math.ceil(page_height / (defaultSettings.watermark_y_space + defaultSettings.watermark_height));
        var x;
        var y;
        for (var i = 0; i < defaultSettings.watermark_rows; i++) {
            y = defaultSettings.watermark_y + (defaultSettings.watermark_y_space + defaultSettings.watermark_height) * i;
            for (var j = 0; j < defaultSettings.watermark_cols; j++) {
                x = defaultSettings.watermark_x + (defaultSettings.watermark_width + defaultSettings.watermark_x_space) * j;
                var mask_div = document.createElement('div');
                mask_div.id = 'mask_div' + i + j;
                mask_div.className = 'mask_div';
                //mask_div.appendChild(document.createTextNode(defaultSettings.watermark_txt));
                mask_div.innerHTML = (defaultSettings.watermark_txt);
                //设置水印div倾斜显示
                mask_div.style.webkitTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
                mask_div.style.MozTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
                mask_div.style.msTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
                mask_div.style.OTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
                mask_div.style.transform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
                mask_div.style.visibility = "";
                mask_div.style.position = "absolute";
                mask_div.style.left = x + 'px';
                mask_div.style.top = y + 'px';
                mask_div.style.overflow = "hidden";
                mask_div.style.zIndex = "1029"; // 9999
                // pointer-events:none  让水印不遮挡页面的点击事件
                mask_div.style.pointerEvents = 'none';
                // 设置边框
                // mask_div.style.border="solid #eee 1px";
                // 兼容IE9以下的透明度设置
                mask_div.style.filter = "alpha(opacity=50)";
                mask_div.style.opacity = defaultSettings.watermark_alpha;
                mask_div.style.fontSize = defaultSettings.watermark_fontsize;
                mask_div.style.fontFamily = defaultSettings.watermark_font;
                mask_div.style.color = defaultSettings.watermark_color;
                mask_div.style.textAlign = "center";
                mask_div.style.width = defaultSettings.watermark_width + 'px';
                mask_div.style.height = defaultSettings.watermark_height + 'px';
                mask_div.style.display = "block";
                oTemp.appendChild(mask_div);
            }
            ;
        }
        ;
        maskElement.appendChild(oTemp);
    }

    function getDate() {
        var d = new Date();
        var year = d.getFullYear() >= 10 ? d.getFullYear() : ('0' + d.getFullYear());

        var month = d.getMonth() + 1 >= 10 ? d.getMonth() + 1 : ('0' + (d.getMonth() + 1));
        var day = d.getDate() >= 10 ? d.getDate() : ('0' + d.getDate());
        var hour = d.getHours() >= 10 ? d.getHours() : ('0' + d.getHours());
        var minute = d.getMinutes() >= 10 ? d.getMinutes() : ('0' + d.getMinutes());
        var second = d.getSeconds() >= 10 ? d.getSeconds() : ('0' + d.getSeconds());
        return year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;
    }

</script>

<script>
    $(document).ready(function () {
        $('#example-getting-started').selectpicker();
        var child = document.getElementById('example-getting-started');
        child.parentNode.style.cssText = 'width: 300px;    position: relative;z-index: 5000;';
    });
</script>
</body>
</html>